import Vue from 'vue'
import VueRouter from 'vue-router'
// 引入路由
import Find from '@/views/find.vue'
import Mymusic from '@/views/mymusic.vue'
import Like from '@/views/like.vue'
// 引入二级路由
import TuiJian from '../views/tuijian.vue'
import PaiHangBang from '../views/paiHangBang.vue'
import Sing from '../views/sing.vue'
import Singer from '../views/singer.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: Find,
      children: [
        {
          path: '/tuijian',
          component: TuiJian,
        },
        {
          path: '/paihangbang',
          component: PaiHangBang,
        },
        {
          path: '/sing',
          component: Sing,
        },
        {
          path: '/singer',
          component: Singer,
        },
      ],
    },
    {
      path: '/find',
      component: Find,
    },
    {
      path: '/mymusic',
      component: Mymusic,
    },
    {
      path: '/like',
      component: Like,
    },
  ],
})

export default router
